#include<linux/module.h>
#include<linux/sched.h>
#include<linux/pid.h>
MODULE_LICENSE("GPL");
static int __init pid_vnr_init(void)
{
	printk("into pid_vnr_init.\n");
	struct pid *kpid=find_get_pid(current->pid);
	printk("the level of the pid is:%d\n",kpid->level);
	printk("the pid of the pid is:%d\n",kpid->numbers[kpid->level].nr);

	int vnr=pid_vnr(kpid);
	printk("the pid_vnr result is:%d\n",vnr);
	printk("the current pid is:%d\n",current->pid);
	printk("the current tgid is:%d\n",current->tgid);
	printk("out pid_vnr_init.\n");
	return 0;
}
static void __exit pid_vnr_exit(void)
{
	printk("Goodbye pid_vnr\n");
}
module_init(pid_vnr_init);
module_exit(pid_vnr_exit);
